<?php
/*
Template Name: Home Page
*/
?>
<?php get_header(); ?>
        <div id="container">
            <div id="content">
            	<div id="slider">
            		<div class="flex-container">
            			<div class="flexslider">
            				<ul class="slides">
            					<?php
            					$featured_slides = new WP_Query('showposts=5&category_name=featured');
								while ($featured_slides->have_posts()) : $featured_slides->the_post();
								?>
								<li>
									<a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'spartans-speak'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php echo clean_wp_width_height(get_the_post_thumbnail(get_the_ID(),'slider-image')); ?></a>
									<div class="flex-caption">
										<h3><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'spartans-speak'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
										<?php better_excerpts('25','','<strong><em><p>','plain','no'); ?>
									</div>
								</li>
								<?php endwhile; ?>
            				</ul>
            			</div>
            		</div>
            	</div><!-- #slider -->
            	
            	<div id="featured-content" class="group">
            		<div id="f-title" class="entry-title">
            			<h1>Featured Articles</h1>
            		</div>
            		
            		<div id="articles">
            			<?php // articles loop
            			$recent = new WP_Query('showposts=2');
						while ($recent->have_posts()) : $recent->the_post();
						?>
						<article id="<?php the_ID(); ?>" class="group">
							<header>
								<div class="entry-title">
									<h3><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'spartans-speak'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
								</div>
							</header>
							<div class="entry-content">
								<p><?php the_excerpt(); ?></p>
							</div>
							<div class="read-btn">
								<a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'spartans-speak'), the_title_attribute('echo=0') ); ?>" rel="bookmark">Read More</a>
							</div>
						</article>
						<?php endwhile; ?>
            		</div><!-- #articles -->
            		
            		<aside id="discussion">
            			<?php if ( is_sidebar_active('discussion_widget_area') ) : ?>
							<div id="discussion-content" class="widget-area">
								<ul class="xoxo">
								<?php dynamic_sidebar('discussion_widget_area'); ?>
								</ul>
							</div><!-- #discussion-content .widget-area -->
						<?php endif; ?>
            		</aside><!-- #discussion -->
            	</div><!-- #featured-content -->
            </div><!-- #content -->
        </div><!-- #container -->
<?php get_footer(); ?>
